<script setup>
import { ref } from 'vue'

import component2 from '@/components/3COMPONENT/component2.vue';

const countModel = ref(1)
</script>

<template>
    <h1>{{countModel}}</h1>
    <!-- 父组件可以用 v-model 绑定一个值 -->
    <component2 v-model="countModel"/><br>
    <button @click="countModel--">decrease</button>
</template>